package com.ebupt.migu.music.global.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ebupt.migu.globalpopup.entity.ActivityApprove;
import com.ebupt.migu.globalpopup.entity.ActivityInfo;
import org.apache.ibatis.annotations.Mapper;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @Author liuyangyang@ebupt.com
 * @Description
 * @Date 2021/11/23 10:08
 */
@Mapper
@DS("mysql_mg")
public interface GlobalApproveMapper extends BaseMapper<ActivityApprove> {

    /**
     * 查询全局弹窗审核人
     * @return
     */
    List<Map<String, Object>> qryChecker();

    /**
     * 查询审批列表总数
     *
     * @param map
     * @return
     */
    int qryApproveListCount(Map<String, Object> map);

    /**
     * 查询审批列表
     *
     * @param map
     * @return
     */
    List<ActivityInfo> qryApproveList(Map<String, Object> map);

    /**
     * 根据活动ID查询活动详情
     * @param activityId
     * @return
     */
    Map<String, Object> qryActivityInfo(String activityId);

    /**
     * 更新活动状态
     * @param map
     * @return
     */
    void updateActivity(Map<String, Object> map);
}
